package com.neudeu.zy;

public class ColaEmployee {
    //成员变量
    //员工姓名
    String eName;


    //生日
    int eBirthdayMonth;




    //行为方法

    /**
     * 计算获取员工指定月份的工资
     * @param month 计算工资的月份
     * @return 指定月份的工资
     */
    public double getSalary(int month){
        //工资
        double mySalary=0.0;//初始化
        //员工是否可以获得生日金
        if (this.eBirthdayMonth==month){
            mySalary+=100;
        }
        return mySalary;
    }
    //自定义构造方法


    public ColaEmployee(String eName, int eBirthdayMonth) {
        this.eName = eName;
        this.eBirthdayMonth = eBirthdayMonth;
    }

    //显示写出的默认构造方法
    public ColaEmployee() {
    }

    public String geteName() {
        return eName;
    }

    public void seteName(String eName) {
        this.eName = eName;
    }


    public int geteBirthdayMonth() {
        return eBirthdayMonth;
    }

    public void seteBirthdayMonth(int eBirthdayMonth) {
        this.eBirthdayMonth = eBirthdayMonth;
    }

    @Override
    public String toString() {
        return "员工姓名：" +eName + ", 生日月份=" + eBirthdayMonth;
    }
}
